package com.ymttest.database.mapping.thirdpartysync;

import com.ymttest.database.model.thirdpartysync.syncinfo;
import com.ymttest.database.model.thirdpartysync.syncinfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface syncinfoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @SelectProvider(type=syncinfoSqlProvider.class, method="countByExample")
    int countByExample(syncinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @DeleteProvider(type=syncinfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(syncinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @Delete({
        "delete from syncinfo",
        "where SyncId = #{syncId,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long syncId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @Insert({
        "insert into syncinfo (SyncId, Command, ",
        "UserId, OpenId, ",
        "Subject, Body, Status, ",
        "ExecuteTimes, Remark, ",
        "CreateTime, UpdateTime)",
        "values (#{syncId,jdbcType=BIGINT}, #{command,jdbcType=VARCHAR}, ",
        "#{userId,jdbcType=INTEGER}, #{openId,jdbcType=VARCHAR}, ",
        "#{subject,jdbcType=VARCHAR}, #{body,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
        "#{executeTimes,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(syncinfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @InsertProvider(type=syncinfoSqlProvider.class, method="insertSelective")
    int insertSelective(syncinfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @SelectProvider(type=syncinfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="SyncId", property="syncId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="Command", property="command", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="OpenId", property="openId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Subject", property="subject", jdbcType=JdbcType.VARCHAR),
        @Result(column="Body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="Status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="ExecuteTimes", property="executeTimes", jdbcType=JdbcType.INTEGER),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<syncinfo> selectByExample(syncinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @Select({
        "select",
        "SyncId, Command, UserId, OpenId, Subject, Body, Status, ExecuteTimes, Remark, ",
        "CreateTime, UpdateTime",
        "from syncinfo",
        "where SyncId = #{syncId,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="SyncId", property="syncId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="Command", property="command", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="OpenId", property="openId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Subject", property="subject", jdbcType=JdbcType.VARCHAR),
        @Result(column="Body", property="body", jdbcType=JdbcType.VARCHAR),
        @Result(column="Status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="ExecuteTimes", property="executeTimes", jdbcType=JdbcType.INTEGER),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    syncinfo selectByPrimaryKey(Long syncId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @UpdateProvider(type=syncinfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") syncinfo record, @Param("example") syncinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @UpdateProvider(type=syncinfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") syncinfo record, @Param("example") syncinfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @UpdateProvider(type=syncinfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(syncinfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table syncinfo
     *
     * @mbggenerated Mon Nov 04 17:06:52 CST 2019
     */
    @Update({
        "update syncinfo",
        "set Command = #{command,jdbcType=VARCHAR},",
          "UserId = #{userId,jdbcType=INTEGER},",
          "OpenId = #{openId,jdbcType=VARCHAR},",
          "Subject = #{subject,jdbcType=VARCHAR},",
          "Body = #{body,jdbcType=VARCHAR},",
          "Status = #{status,jdbcType=INTEGER},",
          "ExecuteTimes = #{executeTimes,jdbcType=INTEGER},",
          "Remark = #{remark,jdbcType=VARCHAR},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where SyncId = #{syncId,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(syncinfo record);
}